package com.tanger.common.excel;

import java.util.ArrayList;
import java.util.List;

public class ExportHandle {
    /**
     * @Author Hchenbin
     * @Decription 以pageSise分隔List对象
     **/
    public static <T> List<List<T>>  splistList(List<T> list, int pageSize){
        List<List<T>> listArray = new ArrayList<List<T>>();
        List<T> subList = null;
        for(int i =0;i<list.size();i++){
            if(i%pageSize ==0){
                subList = new ArrayList<T>();
                listArray.add(subList);
            }
            subList.add(list.get(i));
        }
        return listArray;
    }
}
